home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 2000 July / macformat-092.iso / MacFormat 92 CD / Shareware Plus / Utilities / FolderSynchronizer 1.8.9 / FoldersSynchronizer / FoldersSynchronizer.9 / AllScripts_8_TimerScripts.ls < prev    next >
Encoding:
Text File  |  2000-05-10  |  17.9 KB  |  573 lines

  1. on Timer___________________________
  2. end
  3.  
  4. on InitTimer
  5.   global gMaxTimer, gToday, gTimerToDoList, gTempTimerAll, gTimerAll, gTempRememberTimer, gRememberTimer, gTempTimerOnList, gTimerOnList, gTempTimerHourList, gTimerHourList, gTempTimerDayList, gTimerDayList, gTempTimerBy, gTimerBy, gAppliedHourList, gAppliedDayList, gDaysInterval, gHoursInterval, gMinutesInterval, gStartMonth, gStartDay, gStartYear, gStartHour, gStartMinute, gStartInterval, gTheInterval, gLastMomentDone
  6.   set gToday to Sinistra(OSConstDate(), 10)
  7.   set gTimerToDoList to []
  8.   set gTimerAll to 0
  9.   set gRememberTimer to 0
  10.   set gMaxTimer to 7
  11.   set gTimerBy to 1
  12.   set gTempTimerBy to gTimerBy
  13.   set gTempTimerOnList to []
  14.   set gTimerOnList to []
  15.   set gTempTimerHourList to []
  16.   set gTimerHourList to []
  17.   set gTempTimerDayList to []
  18.   set gTimerDayList to []
  19.   repeat with i = 1 to gMaxTimer
  20.     append(gTempTimerOnList, 1)
  21.     append(gTimerOnList, 1)
  22.     append(gTempTimerHourList, " ")
  23.     append(gTimerHourList, " ")
  24.     append(gTempTimerDayList, -1)
  25.     append(gTimerDayList, -1)
  26.   end repeat
  27.   set gAppliedHourList to []
  28.   set gAppliedDayList to []
  29.   set gDaysInterval to -1
  30.   set gHoursInterval to -1
  31.   set gMinutesInterval to -1
  32.   set gStartMonth to -1
  33.   set gStartDay to -1
  34.   set gStartYear to -1
  35.   set gStartHour to -1
  36.   set gStartMinute to -1
  37.   set gStartInterval to -1
  38.   set gTheInterval to -1
  39.   set gLastMomentDone to 0
  40.   set the textHeight of member "fOnOffTimer" to 18
  41.   set the textHeight of member "fHourList" to 18
  42.   set the textHeight of member "fDayList" to 18
  43. end
  44.  
  45. on GoTimer
  46.   global gTempTimerAll, gTimerAll, gTempTimerWhenNeeded, gTimerWhenNeeded, gTempRememberTimer, gRememberTimer, gTempTimerBy, gTimerBy, gDaysInterval, gHoursInterval, gMinutesInterval, gStartMonth, gStartDay, gStartYear, gStartHour, gStartMinute, gTempTimerOnList, gTimerOnList, gTempTimerHourList, gTimerHourList, gTempTimerDayList, gTimerDayList, gMaxTimer, gGrigio, gNero, gSep, gTempDoAndQuit, gDoAndQuit
  47.   if voidp(gTimerAll) then
  48.     set gTimerAll to 0
  49.   end if
  50.   set gTempTimerAll to gTimerAll
  51.   if voidp(gTimerWhenNeeded) then
  52.     set gTimerWhenNeeded to 0
  53.   end if
  54.   set gTempTimerWhenNeeded to gTimerWhenNeeded
  55.   if voidp(gRememberTimer) then
  56.     set gRememberTimer to 0
  57.   end if
  58.   set gTempRememberTimer to gRememberTimer
  59.   if voidp(gTimerBy) then
  60.     set gTimerBy to 1
  61.   end if
  62.   set gTempTimerBy to gTimerBy
  63.   put EMPTY into field "fHourList"
  64.   put EMPTY into field "fDayList"
  65.   set the foreColor of field "fOnOffTimer" to gNero
  66.   set the foreColor of field "fHourList" to gNero
  67.   set the foreColor of field "fDayList" to gNero
  68.   set tempHour to EMPTY
  69.   set tempDay to EMPTY
  70.   set gTempTimerOnList to value(string(gTimerOnList))
  71.   set gTempTimerHourList to value(string(gTimerHourList))
  72.   set gTempTimerDayList to value(string(gTimerDayList))
  73.   set gTempDoAndQuit to gDoAndQuit
  74.   repeat with i = 1 to gMaxTimer
  75.     set myItem to getAt(gTempTimerHourList, i)
  76.     put myItem & RETURN after tempHour
  77.     set myItem to WhichDayString(getAt(gTempTimerDayList, i))
  78.     put myItem & RETURN after tempDay
  79.   end repeat
  80.   delete char -30000 of tempHour
  81.   delete char -30000 of tempDay
  82.   put tempHour into field "fHourList"
  83.   put tempDay into field "fDayList"
  84.   repeat with i = 1 to gMaxTimer
  85.     if not getAt(gTempTimerOnList, i) then
  86.       set the foreColor of line i of field "fOnOffTimer" to gGrigio
  87.       set the foreColor of line i of field "fHourList" to gGrigio
  88.       set the foreColor of line i of field "fDayList" to gGrigio
  89.     end if
  90.   end repeat
  91.   if gDaysInterval = -1 then
  92.     put "0" into field "fDaysIntervallo"
  93.   else
  94.     put gDaysInterval into field "fDaysIntervallo"
  95.   end if
  96.   if gHoursInterval = -1 then
  97.     put "1" into field "fHoursIntervallo"
  98.   else
  99.     put gHoursInterval into field "fHoursIntervallo"
  100.   end if
  101.   if gMinutesInterval = -1 then
  102.     put "0" into field "fMinutesIntervallo"
  103.   else
  104.     put gMinutesInterval into field "fMinutesIntervallo"
  105.   end if
  106.   if gStartMonth = -1 then
  107.     put TodayMonth() into field "fStartMonth"
  108.   else
  109.     put gStartMonth into field "fStartMonth"
  110.   end if
  111.   if gStartDay = -1 then
  112.     put TodayDay() into field "fStartDay"
  113.   else
  114.     put gStartDay into field "fStartDay"
  115.   end if
  116.   if gStartYear = -1 then
  117.     put TodayYear() into field "fStartYear"
  118.   else
  119.     put gStartYear into field "fStartYear"
  120.   end if
  121.   if gStartHour = -1 then
  122.     put NowHour() into field "fStartHour"
  123.   else
  124.     put gStartHour into field "fStartHour"
  125.   end if
  126.   if gStartMinute = -1 then
  127.     put NowMinute() into field "fStartMinute"
  128.   else
  129.     put gStartMinute into field "fStartMinute"
  130.   end if
  131.   go("Timing")
  132.   SetMenuCredits()
  133. end
  134.  
  135. on SetOneTimerOnOff myLinea
  136.   global gTempTimerOnList, gGrigio, gNero
  137.   set a to the foreColor of char 1 of line myLinea of field "fOnOffTimer" = gNero
  138.   set a to not a
  139.   if a then
  140.     set colore to gNero
  141.     set myValore to 1
  142.   else
  143.     set colore to gGrigio
  144.     set myValore to 0
  145.   end if
  146.   set the foreColor of char 1 of line myLinea of field "fOnOffTimer" to colore
  147.   set the foreColor of line myLinea of field "fHourList" to colore
  148.   set the foreColor of line myLinea of field "fDayList" to colore
  149.   setAt(gTempTimerOnList, myLinea, myValore)
  150. end
  151.  
  152. on AskForHour myLinea
  153.   global gTempTimerHourList
  154.   if the optionDown then
  155.     put " " into line myLinea of field "fHourList"
  156.     setAt(gTempTimerHourList, myLinea, " ")
  157.   else
  158.     OpenHourWind(myLinea)
  159.   end if
  160. end
  161.  
  162. on ImportTimerHour myLinea
  163.   global gHour, gMinute, gTempTimerHourList, gTempTimerDayList
  164.   if length(gHour) = 1 then
  165.     put "0" before gHour
  166.   end if
  167.   if length(gMinute) = 1 then
  168.     put "0" before gMinute
  169.   end if
  170.   set myHourAndMinute to gHour & ":" & gMinute
  171.   put myHourAndMinute into line myLinea of field "fHourList"
  172.   if line myLinea of field "fDayList" = " " then
  173.     put "Every Day" into line myLinea of field "fDayList"
  174.     setAt(gTempTimerDayList, myLinea, 0)
  175.   end if
  176.   setAt(gTempTimerHourList, myLinea, myHourAndMinute)
  177. end
  178.  
  179. on AskForDay myLinea
  180.   global gTempTimerDayList
  181.   if the optionDown then
  182.     put " " into line myLinea of field "fDayList"
  183.     setAt(gTempTimerDayList, myLinea, -1)
  184.   else
  185.     PopTimerDay(myLinea)
  186.   end if
  187. end
  188.  
  189. on PopTimerDay riga
  190.   global gTempTimerDayList, gMyStageWidth, gMyStageHeight
  191.   put field "fPopDayMatrice" into field "fPopDay"
  192.   set myPresetLine to WhichDayNumber(line riga of field "fDayList") + 1
  193.   if myPresetLine > 0 then
  194.     put "‚Ä¢ " into char 1 to 3 of line myPresetLine of field "fPopDay"
  195.     set deltaPreSet to (myPresetLine - 1) * 12
  196.   else
  197.     set deltaPreSet to 0
  198.   end if
  199.   set mySprite to 24
  200.   set myH to the left of sprite mySprite - 1
  201.   set myV to ((riga - 1) * 18) - 1 + the top of sprite mySprite - deltaPreSet
  202.   if (myV + the height of member "fPopDay" + 4) > gMyStageHeight then
  203.     set myV to gMyStageHeight - the height of member "fPopDay" - 4
  204.   end if
  205.   set the loc of sprite 58 to point(myH, myV)
  206.   set myHT to myH + 79
  207.   set myVT to myV + 41
  208.   set the loc of sprite 56 to point(myHT, myVT)
  209.   updateStage()
  210.   repeat while the stillDown
  211.     if the rollOver = 58 then
  212.       set myRollLine to the mouseLine
  213.       if myRollLine > 0 then
  214.         set the loc of sprite 57 to point(myH, myV + ((myRollLine - 1) * 12))
  215.         set the loc of sprite 59 to point(myH, myV + ((myRollLine - 1) * 12))
  216.       else
  217.         set the loc of sprite 57 to point(-1000, -1000)
  218.         set the loc of sprite 59 to point(-1000, -1000)
  219.       end if
  220.     else
  221.       if the rollOver <> 59 then
  222.         set the loc of sprite 57 to point(-1000, -1000)
  223.         set the loc of sprite 59 to point(-1000, -1000)
  224.       end if
  225.     end if
  226.     updateStage()
  227.   end repeat
  228.   if the rollOver = 59 then
  229.     put WhichDayString(myRollLine - 1) into line riga of field "fDayList"
  230.     setAt(gTempTimerDayList, riga, myRollLine - 1)
  231.   end if
  232.   set the loc of sprite 56 to point(-1000, -1000)
  233.   set the loc of sprite 57 to point(-1000, -1000)
  234.   set the loc of sprite 58 to point(1000, 1000)
  235.   set the loc of sprite 59 to point(1000, 1000)
  236.   updateStage()
  237. end
  238.  
  239. on WhichDayString linea
  240.   case linea of
  241.     0:
  242.       return "Every Day"
  243.     1:
  244.       return "Monday"
  245.     2:
  246.       return "Tuesday"
  247.     3:
  248.       return "Wednesday"
  249.     4:
  250.       return "Thursday"
  251.     5:
  252.       return "Friday"
  253.     6:
  254.       return "Saturday"
  255.     7:
  256.       return "Sunday"
  257.     (-1):
  258.       return " "
  259.     otherwise:
  260.       return "Every Day"
  261.   end case
  262. end
  263.  
  264. on WhichDayNumber stringa
  265.   case stringa of
  266.     "Every Day":
  267.       return 0
  268.     "Monday":
  269.       return 1
  270.     "Tuesday":
  271.       return 2
  272.     "Wednesday":
  273.       return 3
  274.     "Thursday":
  275.       return 4
  276.     "Friday":
  277.       return 5
  278.     "Saturday":
  279.       return 6
  280.     "Sunday":
  281.       return 7
  282.     " ":
  283.       return -1
  284.     otherwise:
  285.       return 0
  286.   end case
  287. end
  288.  
  289. on TastoTimer
  290.   global gBianco, gNero
  291.   if (the key = RETURN) or (charToNum(the key) = 3) then
  292.     set mySprite to 39
  293.   else
  294.     if the keyCode = 53 then
  295.       set mySprite to 36
  296.     else
  297.       exit
  298.     end if
  299.   end if
  300.   set myBtnUp to the name of member the member of sprite mySprite
  301.   set myTextMember to the member of sprite (mySprite + 1)
  302.   set the member of sprite mySprite to BtnDw(myBtnUp)
  303.   set the forecolor of myTextMember to gBianco
  304.   updateStage()
  305.   repeat with i = 0 to 15000
  306.   end repeat
  307.   set the member of sprite mySprite to myBtnUp
  308.   set the foreColor of member myTextMember to gNero
  309.   updateStage()
  310.   if mySprite = 39 then
  311.     ApplyTimer()
  312.   else
  313.     if mySprite = 36 then
  314.       GoLista()
  315.     end if
  316.   end if
  317. end
  318.  
  319. on ApplyTimer
  320.   global gTempTimerAll, gTimerAll, gTempRememberTimer, gRememberTimer, gTempTimerBy, gTimerBy, gDaysInterval, gHoursInterval, gMinutesInterval, gStartMonth, gStartDay, gStartYear, gStartHour, gStartMinute, gStartInterval, gTheInterval, gLastMomentDone, gTempTimerOnList, gTimerOnList, gTempTimerHourList, gTimerHourList, gTempTimerDayList, gTimerDayList, gMaxTimer, gAppliedHourList, gAppliedDayList, gTempDoAndQuit, gDoAndQuit
  321.   if (gTempDoAndQuit = 1) and (gTempTimerAll = 1) then
  322.     AlertBox("Cannot set the " & QUOTE & "Timer On" & QUOTE & " with " & QUOTE & "On Start: Sync/BackUp and Quit" & QUOTE)
  323.     exit
  324.   end if
  325.   if gTempTimerAll then
  326.     if gTempTimerBy = 1 then
  327.       set k to 0
  328.       repeat with i = 1 to gMaxTimer
  329.         if getAt(gTempTimerOnList, i) then
  330.           if (getAt(gTempTimerHourList, i) <> " ") and (getAt(gTempTimerDayList, i) = -1) then
  331.             AlertBox("Cannot set a Timer without the Day definition on line" && i & ".")
  332.             exit
  333.           end if
  334.           if (getAt(gTempTimerHourList, i) = " ") and (getAt(gTempTimerDayList, i) >= 0) then
  335.             AlertBox("Cannot set a Timer without the Hour definition on line" && i & ".")
  336.             exit
  337.           end if
  338.           if getAt(gTempTimerHourList, i) <> " " then
  339.             set k to k + 1
  340.           end if
  341.         end if
  342.       end repeat
  343.       if k = 0 then
  344.         AlertBox("Cannot set a Timer without Timing.")
  345.         exit
  346.       end if
  347.     else
  348.       set myDays to value(field "fDaysIntervallo")
  349.       set myHours to value(field "fHoursIntervallo")
  350.       set myMinutes to value(field "fMinutesIntervallo")
  351.       set mySomma to myDays + myHours + myMinutes
  352.       if mySomma <= 0 then
  353.         AlertBox("Invalid Timer Interval.")
  354.         exit
  355.       end if
  356.       set myStartYear to value(field "fStartYear")
  357.       set myNoBisestile to myStartYear mod 4
  358.       set myStartMonth to value(field "fStartMonth")
  359.       set myStartDay to value(field "fStartDay")
  360.       if (myStartDay = 31) and ((myStartMonth = 11) or (myStartMonth = 4) or (myStartMonth = 6) or (myStartMonth = 9)) then
  361.         AlertBox("Invalid Starting Date.")
  362.         exit
  363.       end if
  364.       if (myStartMonth = 2) and (myStartDay > 28) then
  365.         if myStartDay > 29 then
  366.           AlertBox("Invalid Starting Date.")
  367.           exit
  368.         else
  369.           if myNoBisestile then
  370.             AlertBox("Invalid Starting Date." && myStartYear && "is not a leap year.")
  371.             exit
  372.           end if
  373.         end if
  374.       end if
  375.     end if
  376.   end if
  377.   set gTimerAll to gTempTimerAll
  378.   set gRememberTimer to gTempRememberTimer
  379.   set gTimerBy to gTempTimerBy
  380.   set gDoAndQuit to gTempDoAndQuit
  381.   set gTimerOnList to value(string(gTempTimerOnList))
  382.   set gTimerHourList to value(string(gTempTimerHourList))
  383.   set gTimerDayList to value(string(gTempTimerDayList))
  384.   if gTimerAll and (gTimerBy = 0) then
  385.     set gDaysInterval to value(field "fDaysIntervallo")
  386.     set gHoursInterval to value(field "fHoursIntervallo")
  387.     set gMinutesInterval to value(field "fMinutesIntervallo")
  388.     set gStartMonth to value(field "fStartMonth")
  389.     set gStartDay to value(field "fStartDay")
  390.     set gStartYear to value(field "fStartYear")
  391.     set gStartHour to value(field "fStartHour")
  392.     set gStartMinute to value(field "fStartMinute")
  393.   end if
  394.   set gAppliedHourList to []
  395.   set gAppliedDayList to []
  396.   if gTempTimerAll then
  397.     if gTimerBy then
  398.       repeat with i = 1 to gMaxTimer
  399.         if getAt(gTempTimerOnList, i) then
  400.           if (getAt(gTempTimerHourList, i) <> " ") and (getAt(gTempTimerDayList, i) >= 0) then
  401.             append(gAppliedHourList, getAt(gTempTimerHourList, i))
  402.             append(gAppliedDayList, getAt(gTempTimerDayList, i))
  403.           end if
  404.         end if
  405.       end repeat
  406.       PrepareTimerToDoList()
  407.     else
  408.       set myStartDay to DaysAnnoZero(gStartYear, gStartMonth, gStartDay)
  409.       set gStartInterval to (24 * 60 * myStartDay) + (60 * gStartHour) + gStartMinute
  410.       set gTheInterval to (24 * 60 * gDaysInterval) + (60 * gHoursInterval) + gMinutesInterval
  411.       set gLastMomentDone to 0
  412.     end if
  413.   end if
  414.   GoLista()
  415. end
  416.  
  417. on PrepareTimerToDoList
  418.   global gAppliedHourList, gTimerToDoList
  419.   set gTimerToDoList to []
  420.   set NowMinutes to (60 * NowHour()) + NowMinute()
  421.   set TodayDayOfWeek to ((DaysAnnoZero(TodayYear(), TodayMonth(), TodayDay()) + 3) mod 7) + 1
  422.   set k to k + 0
  423.   repeat with i in gAppliedHourList
  424.     set k to k + 1
  425.     set DayOfWeek to getAt(gAppliedDayList, k)
  426.     if (DayOfWeek = 0) or (DayOfWeek = TodayDayOfWeek) then
  427.       set ListMinutes to (value(Sinistra(i, 2)) * 60) + value(Centro(i, 4, 5))
  428.       if ListMinutes > NowMinutes then
  429.         append(gTimerToDoList, i)
  430.       end if
  431.     end if
  432.   end repeat
  433.   sort(gTimerToDoList)
  434. end
  435.  
  436. on DoTimerScript
  437.   global gToday, gAppliedHourList, gAppliedDayList, gTimerToDoList, gMultiAll, gTimerBy, gStartInterval, gTheInterval, gLastMomentDone
  438.   if gTimerBy = 0 then
  439.     set myToday to DaysAnnoZero(TodayYear(), TodayMonth(), TodayDay())
  440.     set thisMoment to (24 * 60 * myToday) + (60 * NowHour()) + NowMinute()
  441.     if gLastMomentDone <> thisMoment then
  442.       set gLastMomentDone to thisMoment
  443.       set YesTimerInterval to (((thisMoment - gStartInterval) mod gTheInterval) = 0) and (thisMoment >= gStartInterval)
  444.       if YesTimerInterval then
  445.         CloseAllWindow()
  446.         DoSynchronize()
  447.       end if
  448.     end if
  449.   else
  450.     set myDay to Sinistra(OSConstDate(), 10)
  451.     if myDay <> gToday then
  452.       set gTimerToDoList to []
  453.       set TodayDayOfWeek to ((DaysAnnoZero(TodayYear(), TodayMonth(), TodayDay()) + 3) mod 7) + 1
  454.       set k to k + 0
  455.       repeat with i in gAppliedHourList
  456.         set k to k + 1
  457.         set DayOfWeek to getAt(gAppliedDayList, k)
  458.         if (DayOfWeek = 0) or (DayOfWeek = TodayDayOfWeek) then
  459.           append(gTimerToDoList, i)
  460.         end if
  461.       end repeat
  462.       sort(gTimerToDoList)
  463.       set gToday to myDay
  464.     end if
  465.     if FindHourToDo() then
  466.       CloseAllWindow()
  467.       DoSynchronize()
  468.     end if
  469.   end if
  470. end
  471.  
  472. on FindHourToDo myTime
  473.   global gTimerToDoList
  474.   set NowMinutes to (60 * NowHour()) + NowMinute()
  475.   repeat with j = 1 to count(gTimerToDoList)
  476.     set i to getAt(gTimerToDoList, j)
  477.     set ListTime to (value(Sinistra(i, 2)) * 60) + value(Centro(i, 4, 5))
  478.     if ListTime <= NowMinutes then
  479.       deleteAt(gTimerToDoList, j)
  480.       return 1
  481.     end if
  482.   end repeat
  483.   return 0
  484. end
  485.  
  486. on AskDeleteAllTimer
  487.   DialogBoxSiNo("Would you delete the Timer list?", "DeleteAllTimer", "nothing")
  488. end
  489.  
  490. on DeleteAllTimer
  491.   global gTempTimerOnList, gTempTimerHourList, gTempTimerDayList, gMaxTimer, gNero
  492.   updateStage()
  493.   set stringa to " " & RETURN & " " & RETURN & " " & RETURN & " " & RETURN & " " & RETURN & " " & RETURN & " "
  494.   put stringa into field "fHourList"
  495.   put stringa into field "fDayList"
  496.   set the foreColor of field "fOnOffTimer" to gNero
  497.   set the foreColor of field "fHourList" to gNero
  498.   repeat with i = 1 to gMaxTimer
  499.     setAt(gTempTimerOnList, i, 1)
  500.     setAt(gTempTimerHourList, i, " ")
  501.     setAt(gTempTimerDayList, i, -1)
  502.   end repeat
  503. end
  504.  
  505. on ChkTimerBy mySprite, myRoll, myRadio
  506.   global gTempTimerBy
  507.   set myBtnUp to the name of member the member of sprite mySprite
  508.   set myValue to value(the last char in myBtnUp)
  509.   if myRadio = "TempTimerBy1" then
  510.     set deltaSprite to 2
  511.   else
  512.     set deltaSprite to -2
  513.   end if
  514.   repeat while the stillDown
  515.     if the rollOver = myRoll then
  516.       set the member of sprite mySprite to BtnDw(myBtnUp)
  517.     else
  518.       set the member of sprite mySprite to myBtnUp
  519.     end if
  520.     updateStage()
  521.   end repeat
  522.   set the member of sprite mySprite to myBtnUp
  523.   updateStage()
  524.   if myValue = 1 then
  525.     exit
  526.   end if
  527.   if the rollOver = myRoll then
  528.     set gTempTimerBy to not gTempTimerBy
  529.     put "0" into char length(myBtnUp) of myBtnUp
  530.     set the member of sprite (mySprite + deltaSprite) to myBtnUp
  531.     put "1" into char length(myBtnUp) of myBtnUp
  532.   end if
  533.   set the member of sprite mySprite to myBtnUp
  534.   SetIngrigisceTimer()
  535.   updateStage()
  536. end
  537.  
  538. on SetIngrigisceTimer
  539.   global gTempTimerAll, gTempTimerBy
  540.   if not value(gTempTimerAll) then
  541.     set myPoint to point(the left of sprite 17 + 1, the top of sprite 17 + 1)
  542.     set the loc of sprite 100 to myPoint
  543.     set the width of sprite 100 to 310
  544.   else
  545.     if gTempTimerBy = 0 then
  546.       set theSprite to 17
  547.     else
  548.       set theSprite to 51
  549.     end if
  550.     set myPoint to point(the left of sprite theSprite + 1, the top of sprite theSprite + 1)
  551.     set the loc of sprite 100 to myPoint
  552.     set the width of sprite 100 to 155
  553.   end if
  554.   updateStage()
  555. end
  556.  
  557. on MsgTimer
  558.   global gStopTimerAll
  559.   if gStopTimerAll then
  560.     SpegniTimer()
  561.     return " I turned off the Timer."
  562.   else
  563.     return EMPTY
  564.   end if
  565. end
  566.  
  567. on SpegniTimer
  568.   global gTimerAll
  569.   set gTimerAll to 0
  570.   set the member of sprite 26 to member ("BtnUpTimer" & gTimerAll)
  571.   updateStage()
  572. end
  573.